<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@page import="br.com.Dao.ProdutoDao"%>
<%@page import="br.com.Modelo.Produto"%>
<%@page import="br.com.Modelo.UsuarioCliente"%>
<%@page import="br.com.Modelo.UsuarioComerciante"%>
<%@page import="br.com.Modelo.Cupom"%>
<%@page import="br.com.Dao.UsuarioClienteDao"%>
<%@page import="br.com.Dao.CupomDao"%>
<%@page import="br.com.Dao.UsuarioComercianteDao"%>
<%@page import="java.util.List"%>
<%@page import="java.io.IOException"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Mercado Catalão</title>
<!-- Bootstrap Core CSS -->
<link href="/plataforma_marketing/bootstrap/css/bootstrap.css" rel="stylesheet">
<link href="/plataforma_marketing/bootstrap/css/bootstrap-lightbox.css" rel="stylesheet">

	
	
	
<style type="text/css">

/*********************************************
    			Call Bootstrap
*********************************************/

/*********************************************
        		Theme Elements
*********************************************/
.gold {
	color: #FFBF00;
}

/*********************************************
					PRODUCTS
*********************************************/
.product {
	border: 1px solid #dddddd;
	height: 321px;
}

.product>img {
	max-width: 200px;
}

.product-rating {
	font-size: 20px;
	margin-bottom: 25px;
}

.product-title {
	font-size: 20px;
}

.product-desc {
	font-size: 14px;
}

.product-price {
	font-size: 22px;
}

.product-stock {
	color: #74DF00;
	font-size: 20px;
	margin-top: 10px;
}

.product-info {
	margin-top: 50px;
}

/*********************************************
					VIEW
*********************************************/
.content-wrapper {
	max-width: 1140px;
	background: #fff;
	margin: 0 auto;
	margin-top: 25px;
	margin-bottom: 10px;
	border: 0px;
	border-radius: 0px;
}

.view-wrapper {
	float: right;
	max-width: 70%;
	margin-top: 25px;
}

/*********************************************
				ITEM 
*********************************************/
.service1-items {
	padding: 0px 0 0px 0;
	float: left;
	position: relative;
	overflow: hidden;
	max-width: 100%;
	height: 321px;
	width: 200px;
}

.service1-item {
	height: 107px;
	width: 120px;
	display: block;
	float: left;
	position: relative;
	padding-right: 20px;
	border-right: 1px solid #DDD;
	border-top: 1px solid #DDD;
	border-bottom: 1px solid #DDD;
}

.service1-item>img {
	max-height: 110px;
	max-width: 110px;
	opacity: 0.6;
	transition: all .2s ease-in;
	-o-transition: all .2s ease-in;
	-moz-transition: all .2s ease-in;
	-webkit-transition: all .2s ease-in;
}

.service1-item>img:hover {
	cursor: pointer;
	opacity: 1;
}

.service-image-left {
	padding-right: 10px;
}

.service-image-right {
	padding-left: 100px;
}

.service-image-left>center>img,.service-image-right>center>img {
	max-height: 155px;
}

.topo {
	width: 100%;
	height: 100px;
	background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0.1, #223D62),
		color-stop(1, #152840));
	background-image: -o-linear-gradient(bottom, #223D62 10%, #152840 100%);
	background-image: -moz-linear-gradient(bottom, #223D62 10%, #152840 100%);
	background-image: -webkit-linear-gradient(bottom, #223D62 10%, #152840 100%);
	background-image: -ms-linear-gradient(bottom, #223D62 10%, #152840 100%);
	background-image: linear-gradient(to bottom, #223D62 10%, #152840 100%);
}

.logo {
	background-image: url(/plataforma_marketing/img/logo.png);
	width: 172px;
	height: 100px;
}

body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}

#sexo {
	background: red;
	width: 40%;
}

#sex {
	background: green;
}

body {
	/*font-family: 'Open Sans', sans-serif;
	font-weight: 400;
	color: #666;
	font-size: 12px;
	line-height: 20px;*/
}



.nav-tabs {
	margin-bottom: 15px;
}

div.required .control-label:before {
	content: '* ';
	color: #F00;
	font-weight: bold;
}
/* Gradent to all drop down menus */
.dropdown-menu li>a:hover {
	text-decoration: none;
	color: #ffffff;
	background-color: #229ac8;
	background-image: linear-gradient(to bottom, #23a1d1, #1f90bb);
	background-repeat: repeat-x;
}
/* top */



/* logo */
#logo {
	margin: 0 0 10px 0;
}
/* search */
#search {
	margin-bottom: 10px;
}

#search .input-lg {
	height: 40px;
	line-height: 20px;
	padding: 0 10px;
}

#search .btn-lg {
	font-size: 15px;
	line-height: 18px;
	padding: 10px 35px;
	text-shadow: 0 1px 0 #FFF;
}
/* cart */
#cart {
	margin-bottom: 10px;
}

#cart>.btn {
	font-size: 12px;
	line-height: 18px;
	color: #FFF;
}

#cart.open>.btn {
	background-image: none;
	background-color: #FFFFFF;
	border: 1px solid #E6E6E6;
	color: #666;
	box-shadow: none;
	text-shadow: none;
}

#cart.open>.btn:hover {
	color: #444;
}

#cart .dropdown-menu {
	background: #eee;
	z-index: 1001;
}

#cart .dropdown-menu {
	min-width: 100%;
}

#cart .dropdown-menu table {
	margin-bottom: 10px;
}

#cart .dropdown-menu li>div {
	min-width: 427px;
	padding: 0 10px;
}

#cart .dropdown-menu li p {
	margin: 20px 0;
}
/* menu */
#menu {
	background-color: #229ac8;
	background-image: linear-gradient(to bottom, #23a1d1, #1f90bb);
	background-repeat: repeat-x;
	border-color: #1f90bb #1f90bb #145e7a;
	min-height: 40px;
}

#menu .nav>li>a {
	color: #fff;
	text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
	padding: 10px 15px 10px 15px;
	min-height: 15px;
	background-color: transparent;
}


/* content */

/* product list */
.product-thumb {
	border: 1px solid #ddd;
	margin-bottom: 20px;
	overflow: auto;
}

.product-thumb .image {
	text-align: center;
}

.product-thumb .image a {
	display: block;
}

.product-thumb .image a:hover {
	opacity: 0.8;
}

.product-thumb .image img {
	margin-left: auto;
	margin-right: auto;
}

.product-grid .product-thumb .image {
	float: none;
}

@media ( min-width : 767px) {
	.product-list .product-thumb .image {
		float: left;
		padding: 15px;
	}
}

.product-thumb h4 {
	font-weight: bold;
}

.product-thumb .caption {
	padding: 0 20px;
	min-height: 180px;
}

.product-list .product-thumb .caption {
	margin-left: 230px;
}

@media ( max-width : 1200px) {
	.product-grid .product-thumb .caption {
		min-height: 210px;
		padding: 0 10px;
	}
}

@media ( max-width : 767px) {
	.product-list .product-thumb .caption {
		min-height: 0;
		margin-left: 0;
		padding: 0 10px;
	}
	.product-grid .product-thumb .caption {
		min-height: 0;
	}
}

.product-thumb .rating {
	padding-bottom: 10px;
}

.rating .fa-stack {
	font-size: 8px;
}

.rating .fa-star-o {
	color: #999;
	font-size: 15px;
}

.rating .fa-star {
	color: #FC0;
	font-size: 15px;
}

.rating .fa-star+.fa-star-o {
	color: #E69500;
}

h2.price {
	margin: 0;
}

.product-thumb .price {
	color: #444;
}

.product-thumb .price-new {
	font-weight: 600;
}

.product-thumb .price-old {
	color: #999;
	text-decoration: line-through;
	margin-left: 10px;
}

.product-thumb .price-tax {
	color: #999;
	font-size: 12px;
	display: block;
}

.product-thumb .button-group {
	border-top: 1px solid #ddd;
	background-color: #eee;
	overflow: auto;
}

.product-list .product-thumb .button-group {
	border-left: 1px solid #ddd;
}

@media ( max-width : 768px) {
	.product-list .product-thumb .button-group {
		border-left: none;
	}
}

.product-thumb .button-group button {
	width: 60%;
	border: none;
	display: inline-block;
	float: left;
	background-color: #eee;
	color: #888;
	line-height: 38px;
	font-weight: bold;
	text-align: center;
	text-transform: uppercase;
}

.product-thumb .button-group button+button {
	width: 20%;
	border-left: 1px solid #ddd;
}

.product-thumb .button-group button:hover {
	color: #444;
	background-color: #ddd;
	text-decoration: none;
	cursor: pointer;
}

@media ( max-width : 1200px) {
	.product-thumb .button-group button,.product-thumb .button-group button+button
		{
		width: 33.33%;
	}
}

@media ( max-width : 767px) {
	.product-thumb .button-group button,.product-thumb .button-group button+button
		{
		width: 33.33%;
	}
}

.thumbnails {
	overflow: auto;
	clear: both;
	list-style: none;
	padding: 0;
	margin: 0;
}

.thumbnails>li {
	margin-left: 20px;
}

.thumbnails {
	margin-left: -20px;
}

.thumbnails>img {
	width: 100%;
}

.image-additional a {
	margin-bottom: 20px;
	padding: 5px;
	display: block;
	border: 1px solid #ddd;
}

.image-additional {
	max-width: 78px;
}

.thumbnails .image-additional {
	float: left;
	margin-left: 20px;
}

.flexslider .slides img {
	width: inherit;
}

.flexslider.carousel .slides img {
	width: auto;
}

.slides {
	padding: 0;
	margin: 0;
	list-style: none;
}

.slides li {
	text-align: center;
}

.slides li img {
	text-align: center;
}

.flex-direction-nav a:before {
	line-height: 40px;
}


 #optionsRadios1{
 
 content: " ";
background-color: #ccc;
display: inline-block;
margin-right: 15px;
width: 8px;
height: 8px;
border: 2px solid #fff;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
visibility: visible;
box-shadow: 0 0 0px 2px #999
 
 
 }
   


</style>

<script type="text/javascript">

$(document).ready(function() {
    var $lightbox = $('#imffg');
    
    $('[data-target="#imddg"]').on('click', function(event) {
        var $img = $(this).find('img'), 
            src = $img.attr('src'),
            alt = $img.attr('alt'),
            css = {
                'maxWidth': $(window).width() - 100,
                'maxHeight': $(window).height() - 100
            };
    
        $lightbox.find('.close').addClass('hidden');
        $lightbox.find('img').attr('src', src);
        $lightbox.find('img').attr('alt', alt);
        $lightbox.find('img').css(css);
    });
    
    $lightbox.on('shown.bs.modal', function (e) {
        var $img = $lightbox.find('img');
            
        $lightbox.find('.modal-dialog').css({'width': $img.width()});
        $lightbox.find('.close').removeClass('hidden');
    });
});

$(document).ready(function() {
	//$('#p').click(function() {
		$("#modal_cupom").on('show.bs.modal', function(event) {
			var button = $(event.relatedTarget);
		    $("#ps").Attr("checked",true);
		});
	//});
});




</script>




</head>

<%@ include file="topo.jsp"%>



<%
	//allow access only if session exists
//response.sendRedirect("erro.jsp");
//out.println(""+request.getParameter("prod"));

	 //produto= new ProdutoDao().getProdId(Long.parseLong(request.getParameter("prod")));
	 // out.println(request.getParameter("comerc"));
	 // out.println(request.getRequestURI());
	    String[] id= (String[]) session.getAttribute("user");
	 	 UsuarioCliente userCliente = null;
	 	UsuarioComerciante userComerciante = null;
	 	UsuarioClienteDao dao = new UsuarioClienteDao();
    	UsuarioComercianteDao dao1 = new UsuarioComercianteDao();
		   CupomDao daoCupom = new CupomDao();
	 	if(id != null){
		//out.print(id[0]+"->"+id[1]);
		if(id[1].equals("1")){
		
	    userCliente = dao.validaAutenticacaoUser(Long.parseLong(id[0]), Integer.parseInt(id[1]));
		
		}else{
	
	    userComerciante = dao1.validaAutenticacaoUser(Long.parseLong(id[0]), Integer.parseInt(id[1]));
		}
	  }
	  	String userName = null;
	  	 String sessionID = null;
	  	 Cookie[] cookies = request.getCookies();
	  	 if(cookies !=null){
	  	for(Cookie cookie : cookies){
			if(cookie.getName().equals("user")) userName = cookie.getValue();
			if(cookie.getName().equals("JSESSIONID")) sessionID = cookie.getValue();
			}
         }
	    if(userCliente != null || userComerciante != null){
		if(userCliente == null){
	//out.print("Login : "+userComerciante.getLogin());
		}else{
	//out.print("Login : "+userCliente.getLogin());			
		}
	}
%>

<!-- carregar pagina the prod-->
<%!public static String getNamePage(long id) {

		ProdutoDao daoProd = new ProdutoDao();	
		
		return daoProd.getPageComerciante(id);
	}
%>

<!-- Bootstrap Core JavaScript -->

<!-- jQuery Version 1.11.0 -->


<%@ include file="../menu.jsp"%>




<!-- carregando dados produto -->
<%  
	
	 Produto produto = new Produto();
	 ProdutoDao daoP = new ProdutoDao();
	 produto  = daoP.getProdId(Long.parseLong(request.getParameter("prod")));

	  if(produto != null)
	 {
		  
%>



<c:out value="${produto.getNome_produto()}" />






<div class="row">
	<div class="col-md-3" align="left">
		<div class="list-group">
			<a href="/plataforma_marketing/roupas" class="list-group-item">Loja de Roupas</a> <a
				href="/plataforma_marketing/sapatos" class="list-group-item">Sapatarias</a> <a
				href="/plataforma_marketing/moveis_eletros" class="list-group-item">Móveis e
				Eletrodomésticos</a> <a href="/plataforma_marketing/supermercados" class="list-group-item">Supermercados</a>
		</div>
	</div>
	<div id="content" class="col-sm-8">
		<div class="row">
	

			<div class="col-sm-8">
				<ul class="thumbnails">
					<li><a class="thumbnail" data-toggle="modal" href="#" data-target="#img" data-placement="button"
						
						title="<%=produto.getNome_produto() %>"><img
							src="/plataforma_marketing/img/product/<%=produto.getImagem_produto() %>"
							title="Clique para ver o produto <%=produto.getNome_produto() %> em tamanho maior" alt="<%=produto.getNome_produto() %>" /></a></li>
				
				</ul>
				<ul class="nav nav-tabs">
					<li class="active"><a href="#tab-description"
						data-toggle="tab">Descrição</a></li>
					
				</ul>
				<div class="tab-content">
					<div class="tab-pane active" id="tab-description">
						<p class="intro"><%=produto.getDescricao_produto()%></p>
					</div>
				
				</div>
			</div>
			<div class="col-sm-4">
				
				<h1><%=produto.getNome_produto()%></h1>
				<ul class="list-unstyled">
					<li>Empresa: <a href="../../<%=getNamePage(produto.getId_produto())%>"><%=getNamePage(produto.getId_produto())%>
					</a></li>
					<li>Codigo Produto: <%=produto.getId_produto()%></li>
					<li>Disponibilidade: Out Of Stock</li>
				</ul>
				<ul class="list-unstyled">
					<%
						if(produto.getPreco_promocao_produto() == 0.0){
					%>
					<li>
						<h2>
							R$<%=produto.getPreco_normal_produto()%></h2>
					</li>
					<%
	 				}else{
					%>
					<li>
						<h2>
							R$<%=produto.getPreco_promocao_produto()%></h2>
					</li>
					<li>Preço Normal: R$<%=produto.getPreco_normal_produto()%>
					</li>
				<% } %>
				</ul>
				<div id="product">
					<div class="form-group">
						<label class="control-label" for="input-quantity">Qtd</label> <input
							type="text" name="quantity" value="1" size="2"
							id="input-quantity" class="form-control" /> <input type="hidden"
							name="product_id" value="40" /> <br />
					   <% if(userCliente != null){   List<Cupom> cupms = daoCupom.getCupomCompleto(userCliente.getId());%>	
						
							<% if(daoCupom.verificarCupomComerciante(userCliente.getId(),produto.getId_produtoComerciante()) == 1){ %>	
					   
					   <button type="button" id="button-cart"
							data-loading-text="Loading..."
							class="btn btn-primary btn-lg btn-block" data-toggle="modal" data-target="#usandoComerciante" data-placement="button" >Usar cupom</button>
					   
					   
					    	   <% }else if(cupms.isEmpty()){%>				   
					  
					   
					   <button type="button" id="button-cart"
							data-loading-text="Loading..."
							class="btn btn-primary btn-lg btn-block" data-toggle="modal" data-target="#modal_cupom_incompleto" data-placement="button" data-whatever="<%=userCliente.getId()%>">Usar cupom</button>
					
						 
						     <%}else{ %>
					   		 
					   		 <button type="button" id="button-cart"
							data-loading-text="Loading..."
							class="btn btn-primary btn-lg btn-block" data-toggle="modal" data-target="#modal_cupom" data-placement="button" data-whatever="<%=userCliente.getId()%>">Usar cupom</button>
					
					   		 
					   		 <%} %>
					   
					   <% }else{%>
					     <button type="button" id="button-cart"
							data-loading-text="Loading..."
							class="btn btn-primary btn-lg btn-block" data-toggle="modal" data-target="#verificarLogin" data-placement="button" >Usar cupom</button>
					   
					   <% } %>
					</div>
				</div>
				<div class="rating">
					<p>
						<span class="fa fa-stack"><i
							class="fa fa-star-o fa-stack-1x"></i></span> <span class="fa fa-stack"><i
							class="fa fa-star-o fa-stack-1x"></i></span> <span class="fa fa-stack"><i
							class="fa fa-star-o fa-stack-1x"></i></span> <span class="fa fa-stack"><i
							class="fa fa-star-o fa-stack-1x"></i></span> <span class="fa fa-stack"><i
							class="fa fa-star-o fa-stack-1x"></i></span> <a href=""
							onclick="$('a[href=\'#tab-review\']').trigger('click'); return false;">0
							reviews</a> / <a href=""
							onclick="$('a[href=\'#tab-review\']').trigger('click'); return false;">Write
							a review</a>
					</p>
					<hr>
				
				</div>
			</div>
		</div>
		
<div id="demoLightbox" class="lightbox hide fade"  tabindex="-1" role="dialog" aria-hidden="true">
	<div class='lightbox-content'>
		<img src="/plataforma_marketing/img/product/kitkat.jpg">
		<div class="lightbox-caption"><p>Your caption here</p></div>
	</div>
</div>
		
					<!-- modal cupom incompleto -->
<div class="modal fade" id="modal_cupom_incompleto" tabindex="1" role="dialog" aria-labelledby="edit" aria-hidden="true">
      <div class="modal-dialog">
    <div class="modal-content">
          <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
        <h4 class="modal-title custom_align" id="Heading">Aviso</h4>
      </div>
          <div class="modal-body">
       
       
          <div class="alert alert-warning"><span class="glyphicon glyphicon-warning-sign"></span> Nao Encontrou nenhum Cupom!!</div>
       
      </div>
        <div class="modal-footer ">   
        <button type="button" class="btn btn-success" data-dismiss="modal"><span class="glyphicon glyphicon-ok-sign"></span> OK</button>
      </div>
        </div>
    <!-- /.modal-content --> 
  </div>
      <!-- /.modal-dialog --> 
    </div>
    
		
		<!-- href="/plataforma_marketing/img/product/<%//=produto.getImagem_produto() %>"-->
		
			<!-- modal verifica comerciante -->
<div class="modal fade" id="usandoComerciante" tabindex="1" role="dialog" aria-labelledby="edit" aria-hidden="true">
      <div class="modal-dialog">
    <div class="modal-content">
          <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
        <h4 class="modal-title custom_align" id="Heading">Aviso</h4>
      </div>
          <div class="modal-body">
       
       <div class="alert alert-danger"><span class="glyphicon glyphicon-warning-sign"></span> Cupom já em uso em : <%=getNamePage(produto.getId_produto())%>!!</div>
          <div class="alert alert-warning"><span class="glyphicon glyphicon-warning-sign"></span> Vocẽ so pode usar apenas um cupom por mes em cada loja!!</div>
       
      </div>
        <div class="modal-footer ">   
        <button type="button" class="btn btn-success" data-dismiss="modal"><span class="glyphicon glyphicon-ok-sign"></span> OK</button>
      </div>
        </div>
    <!-- /.modal-content --> 
  </div>
      <!-- /.modal-dialog --> 
    </div>
    
		
<!-- modal verifica login -->
<div class="modal fade" id="img" tabindex="1" role="dialog" aria-labelledby="edit" aria-hidden="true">
      <div class="modal-dialog">
    <div class="modal-content">
          <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
        <h4 class="modal-title custom_align" id="Heading"><%=produto.getNome_produto() %></h4>
      </div>
          <div class="modal-body">
       
      <div align="center"><img alt="<%=produto.getNome_produto() %>" height="300px" src="/plataforma_marketing/img/product/<%=produto.getImagem_produto() %>"></div>
       
      </div>

        </div>
    <!-- /.modal-content --> 
  </div>
      <!-- /.modal-dialog --> 
    </div>
		
		
		<!-- modal verifica login -->
<div class="modal fade" id="verificarLogin" tabindex="1" role="dialog" aria-labelledby="edit" aria-hidden="true">
      <div class="modal-dialog">
    <div class="modal-content">
          <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
        <h4 class="modal-title custom_align" id="Heading">Aviso</h4>
      </div>
          <div class="modal-body">
       
       <div class="alert alert-warning"><span class="glyphicon glyphicon-warning-sign"></span> Para a utilização do cupom, e necessario efetuar o login?</div>
       
      </div>
        <div class="modal-footer ">   
        <button type="button" class="btn btn-success" data-dismiss="modal"><span class="glyphicon glyphicon-ok-sign"></span> OK</button>
      </div>
        </div>
    <!-- /.modal-content --> 
  </div>
      <!-- /.modal-dialog --> 
    </div>
    
    
    <!--  editar enderco -->
							<!-- Modal -->
							
							<% 
							
							  if(userCliente != null){
					
							  
								  List<Cupom> cups = daoCupom.getCupomCompleto(userCliente.getId());
							   
							%>
							
							<div class="modal fade" id="modal_cupom" tabindex="1000"
								role="dialog" aria-labelledby="" aria-hidden="">
								<div class="modal-dialog">
									<div class="modal-content">
									
									
										<form class="form-horizontal" action="/plataforma_marketing/usarCupom"
											method="post">
											<div class="modal-header">
												<button type="button" class="close" data-dismiss="modal">
													<span aria-hidden="true">&times;</span><span
														class="sr-only">Close</span>
												</button>
												<h4 class="modal-title" id="myModalLabel">Usar Cupom</h4>
											</div>
											<div class="modal-body">



                                                    <% for(Cupom cup : cups){ %>
                                                    
                                                    <div class="radio">
  <label>
    <input type="radio"  name="optionsRadios" id="optionsRadios1" value="<%=cup.getId_Cupom() %>" checked>
    Cupom desconto <%=cup.getId_Cupom() %>
  </label>
</div>
                                                    
										
												 <%} %>
												
												<input type="hidden" id="" name="id_user" value="<%=userCliente.getId()%>"/>	
												<input type="hidden" id="" name="id_produto" value="<%=produto.getId_produto()%>"/>												
												<input type="hidden" id="id_comerciante" name="id_comerciante" value="<%=produto.getId_produtoComerciante()%>"/>
                                              <input type="hidden" id="" name="nome_pagina" value="<%=getNamePage(produto.getId_produto())%>"/>
												</fieldset>
												
							


											</div>

											<div class="modal-footer">
												<button type="button" class="btn btn-default"
													data-dismiss="modal">Close</button>
												<button type="submit" class="btn btn-primary">Confirmar</button>
											</div>
										</form>
										
								
										
									  <%  }%>
									</div>
								</div>
							</div>



							<!-- / editar endereco -->
    



      <% }else{ %>

          <!-- caso nao encontre nenhum produto -->
          
     <div style="padding:10;margin:0 auto;width:80%;font-size:28;margin-top:100px; text-align:center; height : 254px; ">
      
      <h1>Produto Nao Encontrado.</h1>  <img src="/plataforma_marketing/img/page_404.jpg">
     <br/> <h1> Erro 404 </h1>
        
       <hr> <a href="/plataforma_marketing"> <h2>volta pagina inicial</h2></a>
    
    </div>


           
</div>
</div>

      
      <% }    %> <!-- fim if produto = null -->

	
	

		<script>
			$(document).ready(function() {
				$('.thumbnails').magnificPopup({
					type : 'image',
					delegate : 'a',
					gallery : {
						enabled : true
					}
				});
			});
			
		</script>
		

<!-- jQuery Version 1.11.0 -->
	<script src="/plataforma_marketing/bootstrap/js/jquery-1.11.0.js"></script>
	<script src="/plataforma_marketing/bootstrap/js/bootstrap.js"></script>
<script src="/plataforma_marketing/bootstrap/js/bootstrap-lightbox.min.js"></script>



		</body>
</html>